if it then answer "That file is available for writing."
else answer "That file canΓÇÖt be opened for writing."
end mouseUp
-- part 2 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=299 top=300 right=322 bottom=438
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Show Pascal Source
----- HyperTalk script -----
on mouseUp
set the visible of card field 1 to not the visible of card field 1
if the visible of card field 1 is true then
set the name of me to "Hide Pascal Source"
else set the name of me to "Show Pascal Source"
end mouseUp
-- part 3 (field)
-- low flags: 81
-- high flags: 2007
-- rect: left=12 top=26 right=298 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 22
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Source
-- part contents for background part 16
----- text -----
WRITEPERMISSION XFCN version 1.1
Kevin Calhoun
WritePermission determines whether an existing file can be opened for writing as well as reading. It is intended for developers who need to know whether HyperCard can obtain write permission for a stack before the stack is opened. This knowledge is especially useful in shared environments.
INVOKING WRITEPERMISSION
get WritePermission(<fullPathName>,<checkResourceForkAlso>)
returns: true if file can be opened for writing, false otherwise
WritePermission takes two optional parameters, the full pathname of a file and a flag to tell WritePermission to check the resource fork as well as the data fork of the file. If no pathname is supplied, WritePermission will display a standard file dialog, out of which the user can select a file about which to inquire.
If the second parameter is "false", WritePermission returns "true" if the data fork of the file can be opened for writing, "false" otherwise. If the second parameter is "true", WritePermission returns "true" if both the data fork and the resource fork of the file can be opened for writing, "false" otherwise.
2/20/90 version 1.1 works correctly with file servers.
-- part contents for card part 3
----- text -----
UNIT SecretStuffAboutTheFileManager;
{ XFCN WritePermission © 1989 by the Trustees of Dartmouth College }